package com.spring.campus_express_delivery.service;

import com.github.pagehelper.PageInfo;
import com.spring.campus_express_delivery.entity.Orders;
import com.spring.campus_express_delivery.entity.PageBean;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface OrdersService {
    //添加订单
    void insertOrder(Orders orders);
    //根据订单编号查询订单
    Orders selectId(Integer id);
    //修改订单状态(接单）
    void updateOrderStatus(Orders orders);
    //根据订单编号修改订单状态（确认收货）
    void updateOrderStatusByF(Orders orders);
    //根据订单编号修改订单状态（取消接单）
    void updateOrderStatusByCancel(Orders orders);
    //修改订单
    void updateOrders(Orders orders);
    //快递重量类型列表
    PageBean<Orders> selectOrderWeightByPage(int size, int page, String sort, String asc);
    //统计数目
    int selectCountByOrders();
    //根据快递编号查询订单编号
    Orders selectOrderNumByExpressNum(String expressNum);

    //根据订单状态查询订单
    Orders selectOrderStatus(String order_status);
    //用户发布的订单列表
    PageBean<Orders> selectOrdersSelfByPage(String identity_id,int size, int page, String sort, String asc);
    //接单页面的订单列表
    PageBean<Orders> selectOrdersByPage(int size, int page, String sort, String asc);
    //用户个人接的订单列表
    PageBean<Orders> selectBySender(String identity_id,int size, int page, String sort, String asc);
    //删除订单
    void deleteOrderById(Integer id);


    //根据快递重量类型查询订单
    PageBean<Orders> selectOrderByExpressWeightTypeByPage(int size, int page, String sort, String asc,String expressWeightType);
    //根据快递公司类型查询订单
    PageBean<Orders> selectOrderByExpressCompanyTypeByPage(int size, int page, String sort, String asc,String expressCompanyType);
    //根据送达地址查询订单
    PageBean<Orders> selectOrderByServiceAddressByPage(int size, int page, String sort, String asc,String serviceAddress);
    //根据订单状态查询订单
    PageBean<Orders> selectOrderByOrderStatusByPage(int size, int page, String sort, String asc,String order_status,String identity_id);
   //根据订单iid修改快递进度
    void updateMiddle_address(Orders orders);
    //统计数目
    Map<String, Integer> Orders_count();
    //导入订单信息
//    public void importOrdersExcel(MultipartFile orderFiles) throws IOException;

    //查询所有订单
//    List<Orders> selectAllOrders();
    PageInfo<Orders> selectAllOrders(Integer pageNo, Integer pageSize);
    //导出订单信息
    public void exportOrdersExcel(HttpServletResponse response) throws IOException;
    //根据取件码查询订单信息
    List<Orders> selectOrderByPick_code(String keyWord);


}